package x.y.z;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.management.ManagementFactory;

/**
 * 2021/10/14
 */
@SpringBootApplication
@RestController
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

    @RequestMapping("/v1/dev")
    public String msg(){
        String name = ManagementFactory.getRuntimeMXBean().getName();
        String arr[] = name.split("@");
        return "{\""+arr[1]+"\":\""+arr[0]+"\"}";
    }

}
